const store = {
  state: {
    hotSearchOffsetY: 0,
    flapCardVisible: false,
    isInputMode: false,
    isEditMode: false, // 是否进入编辑模式
    shelfList: [], // 书架图书列表
    shelfSelected: [], // 书架图书选中的列表
    shelfTitleVisible: true, // 书架标题的选中状态
    shelfCategory: [], // 书架分类列表数据
    currentType: 1 // 书架列表为1，书架分类列表为2
  },
  mutations: {
    aSetHotSearchOffsetY: (state, offsetY) => {
      state.hotSearchOffsetY = offsetY
    },
    aSetFlapCardVisible: (state, visible) => {
      state.flapCardVisible = visible
    },
    aSetIsInputMode: (state, isInputMode) => {
      state.isInputMode = isInputMode
    },
    aSetIsEditMode: (state, isEditMode) => {
      state.isEditMode = isEditMode
    },
    aSetShelfList: (state, list) => {
      state.shelfList = list
    },
    aSetShelfSelected: (state, selected) => {
      state.shelfSelected = selected
    },
    aSetShelfTitleVisible: (state, visible) => {
      state.shelfTitleVisible = visible
    },
    aSetShelfCategory: (state, category) => {
      state.shelfCategory = category
    },
    aSetCurrentType: (state, type) => {
      state.currentType = type
    }
  }
}
export default store
